package cn.tedu.project.oa.base.response;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

@AllArgsConstructor
@NoArgsConstructor
@Getter
public enum StatusCode {
    SUCCESS(20000,"success"),
    LOGIN_SUCCESS(2001, "登录成功"),
    OPERATION_SUCCESS(2002, "操作成功"),


    badRequest(4000,"输入数据无效"),
    NotLogin(4001,"未登录"),
    USERNAME_ERROR(4002,"用户名或密码错误"),
    PASSWORD_ERROR(4003, "用户名或密码错误"),
    DATA_UNEXISTS(4004, "请求数据不存在"),
    CODE_ERROR(4006,"验证码错误"),
    CODE_EXPIRED(4007,"验证码过期"),
    CODE_SEND_FAILED(4008,"验证码发送失败"),
    CODE_WRITE_ERROR(4009,"验证码写入错误"),
    USER_IS_BANNED(4010,"用户已被禁用"),
    TOKEN_INVALIDED(4200, "token无效"),

    OPERATION_FAILED(5001, "操作失败"),
    VALIDATE_ERROR(5002, "请求参数错误"),
    USERNAME_ALREADY_EXISTS(5003, "用户名被占用"),
    OLD_PASSWORD_ERROR(5004, "旧密码错误"),
    ROLE_NAME_EXIST(5005, "该角色已经存在");


    private int code;
    private String msg;
}
